<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Person extends Model
{
    
    public $tables = 'people';
    
    public $fillable = ['name', 'age', 'sex'];
    public $visible = ['name', 'age', 'sex'];
    
    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
        dump([12345]);
    }
    
    public function posts()
    {
        return $this->hasMany(Post::class);
    }
    
    public function country()
    {
        return $this->belongsTo(Country::class);
    }


}
